package com.qdlc.p2p.biz.protocol;

import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

import com.qdlc.p2p.common.exception.BorrowException;

/**
 * 投资人下载协议实现类
 * 
 * @author qj
 * @version 2.0
 * @since 2014-05-22
 */
@Service
@Scope(value=ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public class TenderProtocol extends AbstractProtocolBean {

	@Override
	public void validDownload() {
		// 先调用父类基础校验
		super.validDownload();
		if (tender == null || tenderId == 0) {
			throw new BorrowException("你不是投资人不能下载该协议！");
		}
	}

	@Override
	public void prepare() {
	}

}
